﻿<%@ page language="java" contentType="text/html; charset=utf-8"
 pageEncoding="utf-8"%>
 <%@ page import="java.util.List,org.jbit.bean.*,org.jbit.dao.*,java.util.ArrayList"%>
<%
UserDao UD = new UserDao();
List<DictionaryHelp> listUser=new ArrayList<DictionaryHelp>();
listUser=UD.getUserDictionary();
String user=(String) request.getSession().getAttribute("user");
String ModuleMark=UD.ModuleMarkByUserName(user);
User users=UD.GetInfoByModuleMark(ModuleMark);
%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<script type="text/javascript">
$.post("../UserUpdateAction?method=update",
				$("#saveForm").serialize(), function(data) {
					alert(data);
				});
</script>
    <!-- Bootstrap -->
    <link href="../css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css">
    <link href="../css/bootstrap.min.css" rel="stylesheet" type="text/css">
   
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
<style type=text/css>
div.tablemain{position:absolute; align:center; top:20%;left:30%;right:30%;}
table {
    *border-collapse: collapse; /* IE7 and lower */
    border-spacing: 0;
    width: 400px;    
    border: solid #ccc 1px;
    -moz-border-radius: 6px;
    -webkit-border-radius: 6px;
    border-radius: 6px;
    -webkit-box-shadow: 0 1px 1px #ccc; 
    -moz-box-shadow: 0 1px 1px #ccc; 
    box-shadow: 0 1px 1px #ccc;         
}
tr.main {
    background: #E6EAE9;
    -o-transition: all 0.1s ease-in-out;
    -webkit-transition: all 0.1s ease-in-out;
    -moz-transition: all 0.1s ease-in-out;
    -ms-transition: all 0.1s ease-in-out;
    transition: all 0.1s ease-in-out;     
} 
tr:hover {
    background: #fbf8e9;
    -o-transition: all 0.1s ease-in-out;
    -webkit-transition: all 0.1s ease-in-out;
    -moz-transition: all 0.1s ease-in-out;
    -ms-transition: all 0.1s ease-in-out;
    transition: all 0.1s ease-in-out;     
}    
    
td,th {
    border-left: 1px solid #ccc;
    border-top: 1px solid #ccc;
    padding: 10px;
    text-align: left;    
}
th {
    background-color: #dce9f9;
    background-image: -webkit-gradient(linear, left top, left bottom, from(#ebf3fc), to(#dce9f9));
    background-image: -webkit-linear-gradient(top, #ebf3fc, #dce9f9);
    background-image:    -moz-linear-gradient(top, #ebf3fc, #dce9f9);
    background-image:     -ms-linear-gradient(top, #ebf3fc, #dce9f9);
    background-image:      -o-linear-gradient(top, #ebf3fc, #dce9f9);
    background-image:         linear-gradient(top, #ebf3fc, #dce9f9);
    -webkit-box-shadow: 0 1px 0 rgba(255,255,255,.8) inset; 
    -moz-box-shadow:0 1px 0 rgba(255,255,255,.8) inset;  
    box-shadow: 0 1px 0 rgba(255,255,255,.8) inset;        
    border-top: none;
    text-shadow: 0 1px 0 rgba(255,255,255,.5); 
}

input{
width:100%;
border:0;
font-size:16px;
}
input[type=text]{padding:5px;}
input[type=submit]{width:200px;height:30px;align:center;}

</style>
</head>
<body>
<div class="container-fluid">
		<!--头部开始-->
<div class="header">
		<!--头部主题开始-->
<div class="navbar navbar-static-top">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <a class="navbar-brand" href="#">
      <img src="../images/logo-m.png" height="34" class="img-rounded" >
      </a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse navbar-brand pull-right">
      <form class="navbar-form navbar-left" role="search" method="post" name="ChooseInfoForm" action="listInfoSearch.jsp">
        <div class="form-group">
          <input name="ModuleMark" id="ModuleMark" type="text" class="form-control" placeholder="请输入GPS编号">
        </div>
        <button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search"></span></button>
      </form>
      <ul class="nav navbar-nav navbar-right">
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><%=(String) request.getSession().getAttribute("user") %> <span class="caret"></span></a>
          <ul class="dropdown-menu" role="menu">
            <li><a href="../EnterpriseUser/person.jsp">个人中心</a></li>
            <li><a href="../EnterpriseUser/ShowMapEnterprise.jsp">车辆追踪</a></li>
            <li><a href="../EnterpriseUser/listInfo">车辆列表</a></li>
            <li class="divider"></li>
            <li><a href="../login.jsp">安全退出</a></li>
          </ul>
        </li>
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</div>
</div>
<hr/>
<div class="tablemain" id="tablemain" align="center">
<form action="../UserUpdateAction?method=updateByUser" method="post">
<input type="hidden" name="ID" id="ID" value="<%=users.getID()%>"/>
<input type="hidden" name="realName" id="realName" value="<%=users.getRealName()%>"/>
<input type="hidden" name="personId" id="personId" value="<%=users.getPersonId()%>"/>
<input type="hidden" name="regitTime" id="regitTime" value="<%=users.getRegitTime()%>"/>
<input type="hidden" name="type" id="type" value="<%=users.getType()%>"/>
<input type="hidden" name="moduleMark" id="moduleMark" value="<%=users.getModuleMark()%>"/>
<input type="hidden" name="moduleMobile" id="moduleMobile" value="<%=users.getModuleMobile()%>"/>
<input type="hidden" name="carId" id="carId" value="<%=users.getCarId()%>"/>
<input type="hidden" name="countyId" id="countyId" value="<%=users.getCountyId()%>"/>
<table width="466" height="142" border="1" align="center">
<%
	String msg = (String) request.getParameter("message");
	if (msg != null && !msg.equals("")) {
	if (msg.equals("success") ) msg="修改成功";
	else if (msg.equals("fail") ) msg="修改失败";
	%>
	<tr>
	<td colspan="2"><div align="center">
	<font color="red" size="2"><%=msg%></font>
	</div></td>
	</tr>
<%}%>
<tr class="main">
  <td height="38" colspan="2"><div align="center">个人信息修改</div></td>
</tr>
<tr>
  <td width="130" height="38">用户名：(只读)</td>
<td width="320"><input type="text"	name="userName" id="userName" value="<%=users.getUserName()%>" readonly/></td></tr>
<tr>
  <td height="38">密码：</td>
<td><input type="text"	name="password" id="password" value="<%=users.getPassword()%>" /></td></tr>
<tr>
  <td height="38">联系电话：</td>
<td><input type="text"	name="userMobile" id="userMobile" value="<%=users.getUserMobile()%>" /></td></tr>
<tr><td colspan="2" align="center"><input type="submit" value="确认"/></td></tr>
</table>
</form>
</div>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="../js/jquery/jquery.min.js"></script>
 <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script type="text/javascript" src="../js/bootstrap.min.js"></script>
</body>
</html>
